Why does using ` =` in JavaScript to build HTML behave differently in Firefox and IE